Optimal. Leaf size=42 \[ -\frac {(b c-a d)^2 \log (a+b x)}{a b^2}+\frac {c^2 \log (x)}{a}+\frac {d^2 x}{b} \]
________________________________________________________________________________________
Rubi [A] time = 0.03, antiderivative size = 42, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 1, integrand size = 18, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.056, Rules used = {72} \begin {gather*} -\frac {(b c-a d)^2 \log (a+b x)}{a b^2}+\frac {c^2 \log (x)}{a}+\frac {d^2 x}{b} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 72
Rubi steps
\begin {align*} \int \frac {(c+d x)^2}{x (a+b x)} \, dx &=\int \left (\frac {d^2}{b}+\frac {c^2}{a x}-\frac {(-b c+a d)^2}{a b (a+b x)}\right ) \, dx\\ &=\frac {d^2 x}{b}+\frac {c^2 \log (x)}{a}-\frac {(b c-a d)^2 \log (a+b x)}{a b^2}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.03, size = 42, normalized size = 1.00 \begin {gather*} \frac {-(b c-a d)^2 \log (a+b x)+a b d^2 x+b^2 c^2 \log (x)}{a b^2} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
IntegrateAlgebraic [F] time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {(c+d x)^2}{x (a+b x)} \, dx \end {gather*}
Verification is not applicable to the result.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 1.36, size = 53, normalized size = 1.26 \begin {gather*} \frac {a b d^{2} x + b^{2} c^{2} \log \relax (x) - {\left (b^{2} c^{2} - 2 \, a b c d + a^{2} d^{2}\right )} \log \left (b x + a\right )}{a b^{2}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 1.11, size = 55, normalized size = 1.31 \begin {gather*} \frac {d^{2} x}{b} + \frac {c^{2} \log \left ({\left | x \right |}\right )}{a} - \frac {{\left (b^{2} c^{2} - 2 \, a b c d + a^{2} d^{2}\right )} \log \left ({\left | b x + a \right |}\right )}{a b^{2}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.01, size = 61, normalized size = 1.45 \begin {gather*} -\frac {a \,d^{2} \ln \left (b x +a \right )}{b^{2}}+\frac {c^{2} \ln \relax (x )}{a}-\frac {c^{2} \ln \left (b x +a \right )}{a}+\frac {2 c d \ln \left (b x +a \right )}{b}+\frac {d^{2} x}{b} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 1.06, size = 53, normalized size = 1.26 \begin {gather*} \frac {d^{2} x}{b} + \frac {c^{2} \log \relax (x)}{a} - \frac {{\left (b^{2} c^{2} - 2 \, a b c d + a^{2} d^{2}\right )} \log \left (b x + a\right )}{a b^{2}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 0.39, size = 49, normalized size = 1.17 \begin {gather*} \frac {d^2\,x}{b}-\ln \left (a+b\,x\right )\,\left (\frac {c^2}{a}+\frac {a\,d^2}{b^2}-\frac {2\,c\,d}{b}\right )+\frac {c^2\,\ln \relax (x)}{a} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [B] time = 0.98, size = 73, normalized size = 1.74 \begin {gather*} \frac {d^{2} x}{b} + \frac {c^{2} \log {\relax (x )}}{a} - \frac {\left (a d - b c\right )^{2} \log {\left (x + \frac {a b c^{2} + \frac {a \left (a d - b c\right )^{2}}{b}}{a^{2} d^{2} - 2 a b c d + 2 b^{2} c^{2}} \right )}}{a b^{2}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________